package com.greyu.ysj.mapper;

import com.greyu.ysj.entity.CbtIncome;
import com.greyu.ysj.entity.CbtIncomeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CbtIncomeMapper {
    long countByExample(CbtIncomeExample example);

    int deleteByExample(CbtIncomeExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(CbtIncome record);

    int insertSelective(CbtIncome record);

    List<CbtIncome> selectByExample(CbtIncomeExample example);

    CbtIncome selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CbtIncome record, @Param("example") CbtIncomeExample example);

    int updateByExample(@Param("record") CbtIncome record, @Param("example") CbtIncomeExample example);

    int updateByPrimaryKeySelective(CbtIncome record);

    int updateByPrimaryKey(CbtIncome record);
    //*******************************************
    double selectTotalIncomeByuserId(int userId);
    
	double selectYesterdayIncomeByuserId(int userId);
	
	CbtIncome getLeftIncomByInvestId(int InvestId);
	
	double selectYesterdayIncomeByInvestId(int investId);
	
	List<CbtIncome> selectTodayIncomeByuserId(Integer userId);
	
	int countIncomeByuserId(Integer userId);
	
	
}